// -----------------------------------------------------------------------------
// Generate By Furion Tools v1.6.0                            
// -----------------------------------------------------------------------------

using Furion.DatabaseAccessor;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;

#nullable disable

namespace iemtm.WeChat.Core
{
    public partial class AnnounceLedger : IEntity<MasterDbContextLocator>, IEntityTypeBuilder<AnnounceLedger, MasterDbContextLocator>
    {

        public int AnnounceLedgerId { get; set; }
        public string JobNumber { get; set; }
        public string BaseStationName { get; set; }
        public string GenerationFor { get; set; }
        public string City { get; set; }
        public string AreaName { get; set; }
        public string AreaCode { get; set; }
        public DateTime? ExecutionDate { get; set; }
        public int? AnnounceStatus { get; set; }
        public DateTime? GenStart { get; set; }
        public DateTime? GenStop { get; set; }
        public decimal? LoadPeriod { get; set; }
        public decimal? EmptyLoadPeriod { get; set; }
        public decimal? RunningTotalPeriod { get; set; }
        public decimal? KWpower { get; set; }
        public string AcceptPersonName { get; set; }
        public string AcceptCompanyName { get; set; }
        public string AcceptCompanyCode { get; set; }
        public string AcceptPersonPhone { get; set; }
        public string GensetNum { get; set; }
        public string DTUID { get; set; }
        public DateTime? CreateDate { get; set; }
        public string Remark { get; set; }
    
        public void Configure(EntityTypeBuilder<AnnounceLedger> entityBuilder, DbContext dbContext, Type dbContextLocator)
        {
                entityBuilder.HasIndex(e => e.JobNumber, "JobNumberOnly")
                    .IsUnique();

                entityBuilder.Property(e => e.AcceptCompanyCode).HasMaxLength(50);

                entityBuilder.Property(e => e.AcceptCompanyName).HasMaxLength(100);

                entityBuilder.Property(e => e.AcceptPersonName).HasMaxLength(50);

                entityBuilder.Property(e => e.AcceptPersonPhone).HasMaxLength(50);

                entityBuilder.Property(e => e.AreaCode).HasMaxLength(50);

                entityBuilder.Property(e => e.AreaName).HasMaxLength(50);

                entityBuilder.Property(e => e.BaseStationName).HasMaxLength(100);

                entityBuilder.Property(e => e.City).HasMaxLength(50);

                entityBuilder.Property(e => e.CreateDate).HasColumnType("datetime");

                entityBuilder.Property(e => e.DTUID).HasMaxLength(50);

                entityBuilder.Property(e => e.EmptyLoadPeriod).HasColumnType("decimal(18, 2)");

                entityBuilder.Property(e => e.ExecutionDate).HasColumnType("datetime");

                entityBuilder.Property(e => e.GenStart).HasColumnType("datetime");

                entityBuilder.Property(e => e.GenStop).HasColumnType("datetime");

                entityBuilder.Property(e => e.GenerationFor).HasMaxLength(50);

                entityBuilder.Property(e => e.GensetNum).HasMaxLength(50);

                entityBuilder.Property(e => e.JobNumber).HasMaxLength(50);

                entityBuilder.Property(e => e.KWpower).HasColumnType("decimal(18, 2)");

                entityBuilder.Property(e => e.LoadPeriod).HasColumnType("decimal(18, 2)");

                entityBuilder.Property(e => e.Remark).HasMaxLength(50);

                entityBuilder.Property(e => e.RunningTotalPeriod).HasColumnType("decimal(18, 2)");
        }

    }
}

